home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / DevInfo / Intuition / ObtainGIRPort < prev    next >
Text File  |  1996-07-13  |  2KB  |  50 lines

  1.  
  2.     $Id: ObtainGIRPort 1.2 1996/07/13 21:04:28 heinz Exp $
  3.  
  4. For those of you who think they have to use something like
  5. the NewObtainGIRPort hack or any equivalent OS patch which can be
  6. subsumed under the familiar name of NewObtainGIRPort, a few
  7. explanations:
  8.  
  9. NewObtainGIRPort is
  10.  
  11.     a) useless, because it is not really fixing things.
  12.        At least the 1.1 code is buggy.
  13.  
  14.     b) the wrong approach, because the application having the
  15.        problem should be fixed. The OS is ok.
  16.  
  17. You are asking why I am saying that? Let me explain.
  18.  
  19. ObtainGIRPort() will also do a layer lock. This is unfortunately
  20. not mentioned in the autodocs. But it is described that you may not
  21. cache that RastPort:
  22.  
  23.     This function must be called EACH time a hook routine needing
  24.     to perform gadget rendering is called, and must be accompanied
  25.     by a corresponding call to ReleaseGIRPort().
  26.  
  27. This is obviously a strong indicator that you
  28.  
  29.     a) may only use simple rendering calls (That's what the
  30.        function is for: rendering)
  31.     b) may not give control back to Intuition either by leaving the
  32.        context or by calling Intuition functions before you called
  33.        ReleaseGIRPort().
  34.  
  35. Once you know that ObtainGIRPort() does a layer lock, you can look
  36. up the LockLayer() autodoc, too:
  37.  
  38.     Further Note: while you hold the lock on a layer, Intuition will block
  39.         on operations such as windowsizing, dragging, menus, and depth
  40.         arranging windows in this layer's screen.  It is recommended that
  41.         YOU do not make Intuition function calls while the layer is locked.
  42.  
  43. So everyone who is currently using a hack like NewObtainGIRPort
  44. should better complain to the authors of the application that
  45. causes the problems in the first place.
  46.  
  47. Heinz Wrobel
  48. <heinz@amiga.de>
  49.  
  50.